# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gsa
pkgver=21.4.4
pkgrel=0
pkgdesc="Greenbone Security Assistant - The web frontend for the Greenbone Vulnerability Management (GVM) framework "
url="https://github.com/greenbone/gsa"
arch="noarch !riscv64" # limited by nodejs
license="APL-3.0"
makedepends="yarn nodejs"
source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/gsa/archive/refs/tags/v$pkgver.tar.gz
	remove-husky-git-hook.patch"

build() {
	yarn
	yarn build
}

check() {
	return 0
}

package() {
	mkdir -p "$pkgdir"/usr/share/gvm/gsad/web/
	cp -r build/* "$pkgdir"/usr/share/gvm/gsad/web/
}

sha512sums="
5a7b45132a049adf608ccd8988d69a415290cc57d6e7537835a78e19aafb5dfdf204197576f69277726587efaccce189c1ccab55c43e5a0a7855c538b3bc4b67  gsa-21.4.4.tar.gz
72e5491a7df8059d56903391803e0064c391eb4023dff25b575e5ca66408d91fd639462b4d6ccfff4b49b21b07484670c34b802bffa7dedbb5d2c0230cd5234c  remove-husky-git-hook.patch
"
